/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.mobisegua;

import android.graphics.drawable.Drawable;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;
import java.util.ArrayList;

/**
 *
 * @author Zé Carlos
 */
public class MapsItemizedOverlay extends ItemizedOverlay
{

    private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();

    public MapsItemizedOverlay(Drawable defaultMarker)
    {
        super(boundCenterBottom(defaultMarker));
        // TODO Auto-generated constructor stub
    }

    @Override
    protected OverlayItem createItem(int i)
    {
        return mOverlays.get(i);
    }

    @Override
    public int size()
    {
        return mOverlays.size();
    }

    public void addOverlay(OverlayItem overlay)
    {
        mOverlays.add(overlay);
        populate();
    }
}
